var loginHandle=0;
window.onresize= formatContent;

function loadContent() {
	var loginLeft = 0;
	var panelLeft = 0;
	var panelWidth = 800;
	var width = getWidth();
	var height = getHeight();
	var loaderLeft = 0;

	if (width>width/2 + 520) loginLeft=width/2 + 310; 
		else if (width<220) loginLeft=5;
		else loginLeft=width-220;

	if (width<panelWidth) panelLeft=5;
		else panelLeft=width/2-panelWidth/2-8;	

	if (height>450) height=height-250; else height=500;
	setStyleByClass("DIV","login_box","left",loginLeft + "px");
	setStyleByClass("DIV","main","height",height + "px");
 	setStyleByClass("DIV","panel_box","left",panelLeft+"px");
 	setStyleByClass("DIV","loader","left",loginLeft+"px");
}

function formatContent() {
	var loginLeft = 0;
	var panelLeft = 0;
	var panelWidth = 800;
	var width = getWidth();

	
	if (width>width/2 + 510) loginLeft=width/2 + 310; 
		else if (width<210) loginLeft=5;
		else loginLeft=width-220;

	if (width<panelWidth) panelLeft=5;
		else panelLeft=width/2-panelWidth/2-8;	


	setStyleByClass("DIV","login_box","left",loginLeft + "px");
	setStyleByClass("DIV","panel_box","left",panelLeft+"px");
	setStyleByClass("DIV","loader","left",loginLeft+"px");
}

function dataTableSelectOneRadio(radio) {
    var id = radio.name.substring(radio.name.lastIndexOf(':'));
    var el = radio.form.elements;
    for (var i = 0; i < el.length; i++) {
        if (el[i].name.substring(el[i].name.lastIndexOf(':')) == id) {
            el[i].checked = false;
        }
    }
    radio.checked = true;
}

function dataTableRowSelection(row, dtStyle) {
    var el = row.parentNode.rows;
    for (var i = 0; i < el.length; i++) {
            el[i].style.backgroundColor = dtStyle;
    }
}